import request from '@/utils/request'
export default {
  listAll(data) {
    return request({
      url: `/generator/dataSource/list`,
      method: 'get',
      params: data
    })
  },

  saveOrUpdate(data) {
    return request({
      url: '/generator/dataSource/saveOrUpdate',
      method: 'post',
      data: data
    })
  },

  listById(id) {
    return request({
      url: `/generator/dataSource/info/${id}`,
      method: 'get'
    })
  },

  removeById(id) {
    return request({
        url: `/generator/dataSource/remove/${id}`,
        method: 'post'
    })
  },

  testDataSource(id) {
    return request({
      url: `/generator/dataSource/testDataSource/${id}`,
      method: 'post'
    })
  }
}